package org.adorsys.aderp.cash.work.cashstate;

import java.util.Date;

import org.adorsys.aderp.cash.domain.CashRegister;
import org.springframework.util.Assert;
/**
 * A full day cashregister state representation
 * @author adorsys
 *
 */
public class BasicFullDayCashRegister implements FullDayCashRegister{
	private CashRegister cashRegister;
	private CashRegisterState cashRegisterState;
	private Date lastStateModifDate;
	private String log;
	
	public BasicFullDayCashRegister(CashRegister cashRegister,
			CashRegisterState cashRegisterState, Date lastStateModifDate,
			String log) {
		super();
		Assert.notNull(cashRegister,"Null parameter is not required");
//		Assert.notNull(cashRegisterState, "Null parameter is not required");
		this.cashRegister = cashRegister;
		this.cashRegisterState = cashRegisterState;
		this.lastStateModifDate = lastStateModifDate;
		this.log = log;
	}
	
	public BasicFullDayCashRegister(CashRegister cashRegister,
			CashRegisterState cashRegisterState) {
		this(cashRegister,cashRegisterState,new Date(),new String(""));
	}
	
	

	public BasicFullDayCashRegister(CashRegister cashRegister) {
		this(cashRegister,null);
	}

	public CashRegister getCashRegister() {
		return cashRegister;
	}
	public void setCashRegister(CashRegister cashRegister) {
		this.cashRegister = cashRegister;
	}
	public CashRegisterState getCashRegisterState() {
		return cashRegisterState;
	}
	public void setCashRegisterState(CashRegisterState cashRegisterState) {
		this.cashRegisterState = cashRegisterState;
	}
	public Date getLastStateModifDate() {
		return lastStateModifDate;
	}
	public void setLastStateModifDate(Date lastStateModifDate) {
		this.lastStateModifDate = lastStateModifDate;
	}
	public String getLog() {
		return log;
	}
	public void setLog(String log) {
		this.log = log;
	}

	@Override
	public String toString() {
		return "BasicFullDayCashRegister [cashRegister=" + cashRegister
				+ ", cashRegisterState=" + cashRegisterState
				+ ", lastStateModifDate=" + lastStateModifDate + ", log=" + log
				+ "]";
	}
	
}
